<!--
  To change this template, choose Tools | Templates
  and open the template in the editor.
-->

<%@ page contentType="text/html;charset=UTF-8" %>

<html>
  <head>
    <meta name="layout" content="main">
    <title>${facility.name} Groups</title>
  </head>
  <body>
    
    <div id="bd">
      <div id="facilityGroupNames" style="float: left">
        <h2>${facility.name} Groups</h2>
        <table>
          <g:each var="name" in="${facilityGroupNames}">
            <tr>
              <td align="right">
                <g:link controller="FacilityGroup" action="view" params="[name: name, facilityName: facility.name]">${name}</g:link>
              </td>
              <td style="padding-left: 10px">
                <g:link action="removeGroup" params="[name: facility.name, groupName: name]">Remove</g:link>
              </td>
            </tr>
          </g:each>
        </table>
        <br /><br />
        <g:link action="view" params="[name: facility.name]">Facility Page</g:link>
      </div>

      <div id="groupNames" style="float: right">
        <h2 align="left">Other Groups</h2>
        <table align="left">
          <g:each var="name" in="${groupNames}">
            <tr>
              <td align="right">
                <g:link controller="FacilityGroup" action="view" params="[name: name, facilityName: facility.name]">${name}</g:link>
              </td>
              <td style="padding-left: 10px">
                <g:link action="addGroup" params="[name: facility.name, groupName: name]">Add</g:link>
              </td>
            </tr>
          </g:each>
        </table>
        <br /><br /><br /><br /><br /><br /><br />
        <g:link controller="FacilityGroup" action="createNew" params="[name: facility.name]">Create New Group</g:link>
      </div>
      <div id="clear" style="clear: both"></div>
    </div>
  
  </body>
</html>
